package com.pactera.madp.cp.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pactera.madp.cp.api.entity.product.ProdContactEntity;
import com.pactera.madp.cp.api.vo.product.ProductContactVO;
import org.apache.ibatis.annotations.Param;

/**
 * (CpProdContact)表数据库访问层
 *
 * @author yushen.qi
 * @since 2021-12-15 16:58:03
 */
public interface ProdContactMapper extends BaseMapper<ProdContactEntity> {

    /**
     * 统计历史次数
     *
     * @param req
     * @return
     */
   String reqCount(@Param(value = "req") String req);

    /**
     * 统计今日次数
     *
     * @param req
     * @param startTime
     * @param endTime
     * @return
     */
   String reqCountToday(@Param(value = "req") String req,@Param(value = "startTime") String startTime,@Param(value = "endTime") String endTime);

    /**
     * 分页
     *
     * @param page
     * @param type
     * @param sort
     * @return
     */
   Page<ProductContactVO> pageOne(Page page,@Param(value = "type") String type,@Param(value = "sort") String sort);

}
